package com.sl.biz.modular.office.controller;

import com.sl.biz.modular.office.dao.domain.entity.OfficeRecordDO;
import com.sl.biz.modular.office.service.OfficeRecordBizService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/office_record")
@RequiredArgsConstructor
public class OfficeRecordController {

    private final OfficeRecordBizService officeRecordBizService;

    @PostMapping("/save")
    public String save(@RequestBody OfficeRecordDO officeRecord) {
        return officeRecordBizService.save(officeRecord);
    }


    @PostMapping("/list")
    public List<OfficeRecordDO> list(@RequestBody OfficeRecordDO jobConfigDO) {
        return officeRecordBizService.list(jobConfigDO);
    }

    @PostMapping("/get_by_id")
    public OfficeRecordDO getById(@RequestBody OfficeRecordDO officeRecordDO) {
        return officeRecordBizService.getById(officeRecordDO);
    }

    @PostMapping("/remove_by_id")
    public Boolean removeById(@RequestBody OfficeRecordDO officeRecordDO) {
        return officeRecordBizService.removeById(officeRecordDO);
    }


}
